package com.shycloud.mido.homework.api.feign;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.shycloud.mido.common.core.constant.SecurityConstants;
import com.shycloud.mido.common.core.constant.ServiceNameConstants;
import com.shycloud.mido.common.core.util.R;
import com.shycloud.mido.homework.api.vo.AtvActiveDetailDataVO;
import com.shycloud.mido.homework.api.vo.AtvActiveDetailReqVO;
import com.shycloud.mido.homework.api.vo.AtvScheduleReqVO;
import com.shycloud.mido.homework.api.vo.AtvScheduleVO;

@FeignClient(value = ServiceNameConstants.NEW_HOMEWORK_SERVICE)
public interface HomeworkFeignService {

	@RequestMapping(method = RequestMethod.POST, value = "/main/activeDetail")
	R<AtvActiveDetailDataVO> activeDetail(@RequestBody AtvActiveDetailReqVO vo) throws Exception;

	@RequestMapping(method = RequestMethod.POST, value = "/main/atvSchedule")
	List<AtvScheduleVO> atvSchedule(@RequestBody AtvScheduleReqVO vo) throws Exception;

	/** APP 比赛进度 feign 接口 */
	@RequestMapping(method = RequestMethod.POST, value = "/main/atvScheduleDetail")
	List<AtvScheduleVO> atvScheduleDetail(@RequestBody AtvScheduleReqVO vo) throws Exception;

	/**
	 * 周报任务
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/week/weekJobBuild")
	R<Boolean> weekJobBuild(@RequestParam("weekDate") String weekDate,
			@RequestHeader(SecurityConstants.FROM) String from) throws Exception;

	/**
	 * 周报发送任务
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/week/weekSendMember")
	R<Boolean> weekSendMember(@RequestHeader(SecurityConstants.FROM) String from) throws Exception;

	/** 根据学生ID获取作业完成状态 */
	@RequestMapping(method = RequestMethod.GET, value = "/main/getHomeWorkStatusByStu")
	List<String> getHomeWorkStatusByStu(@RequestParam("startDate") String startDate,
			@RequestParam("studentId") String studentId) throws Exception;

	/** 批量删除OSS作业录音文件 */
	@RequestMapping(method = RequestMethod.GET, value = "/homework/recording/deleteRecordingSources")
	List<String> deleteRecordingSources(
			@RequestParam("startTime") String startTime,
			@RequestParam("endTime") String endTime,
			@RequestHeader(SecurityConstants.FROM) String from) throws Exception;
}
